<?php if(!defined('IN_PISCES')){exit('Access Denied.');}?>
<link href="{$this->data['baseurl']}css/tzm/bbs.css" rev="stylesheet" rel="stylesheet" type="text/css" media="screen">
<script language="javascript" src="{$this->data['baseurl']}js/jquery/jquery.js"></script>
<script language="javascript" src="{$this->data['baseurl']}js/jquery/form.js"></script>
<script language="javascript" src="{$this->data['baseurl']}js/utils.js"></script>
<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	document.location	= res.data.forward;
}else{
	//alert('出错了，请重新尝试！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#form').ajaxForm(updateOptions); 
}); 
</script>

<div class="direct mb5">
您的位置：
<a href="{$this->data['baseurl']}">{$this->data['site']['site_name']}</a>
 > <a href="{url('Post', 'List')}">购物讨论</a>
 > 发表帖子
</div>
 <div class="clear"></div>
<div class="w1000">
<div>
<form id="form" action="{url('Post','SaveEdit')}" method="post">
<table style="width:1000px; margin:10px auto; ">
	<tr style="width:990px; margin:10px auto; float:left;">
	<th style="width:100px;">帖子标题：</td>
	<td ><input type="text" name="title" style="width:600px; height:20px;"  size="80" {if $this->data['info']}value="{$this->data['info']['title']}"{/if} /><span etype='error_info' class="error_info" id="title_info"></span></td>
	</tr>
	<tr style="width:990px; margin:10px auto; float:left;">
	<th style="width:100px;">帖子内容：</td>
	<td >
	<textarea name="content#content" id="txtcontent" style="width:600px;height:300px">
	{if $this->data['info']}{$this->data['info']['content']['content']}{/if}
	</textarea>
	<span etype='error_info' class="error_info" id="content#content_info"></span>
	</td>
	</tr>
	<tr style="width:990px; margin:10px auto; float:left;">
	<th style="width:100px;">添加标签：</td>
	<td>
	<input name="tag" type="text" size="60" style="width:600px; height:20px;" {if $this->data['info']}value="{$this->data['info']['tag']}"{/if} /><span etype='error_info' class="error_info" id="tag_info">&nbsp;&nbsp;多个标签之间用，分隔</span>
	</td>
	</tr>
	<tr style="width:990px; margin:10px 0; float:left;"><td style="width:100px;"></td><td><input id="btnAjaxSubmit" type="image" value="" src="{$this->data['baseurl']}images/btn_submit.jpg"/><input name="id" type="hidden" value="{$this->data['info']['id']}" /></td></tr>
</table>
</form>
</div>
</div>
 <div class="clear"></div>
<script src="{$this->data['baseurl']}js/editor/kindeditor/kindeditor.js"></script>
<script>
KE.show({
id : 'txtcontent',
allowUpload : false,
items: ['source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', '|', 'selectall', '-',
'title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image', 'advtable', 'hr', 'emoticons', 'link', 'unlink', '|', 'about']
});
</script>
